﻿using System;
using TtfLibrary.CommonStructures;

namespace TtfLibrary
{
    public class OttHead
    {
        public TtfFixed TableVersionNumber = new TtfFixed();
        public TtfFixed FontRevision = new TtfFixed();
        public UInt32 CheckSumAdjustment;
        public UInt32 MagicNumber;
        public UInt16 Flags;
        public UInt16 UnitsPerEm;
        public UInt64 Created;
        public UInt64 Modified;
        public Int16 XMin;
        public Int16 YMin;
        public Int16 XMax;
        public Int16 YMax;
        public UInt16 MacStyle;
        public UInt16 LowestRecPPEM;
        public Int16 FontDirectionHint;
        public Int16 IndexToLocFormat;
        public Int16 GlyphDataFormat;

        public DateTime CreatedTime { get { return new DateTime(1904, 1, 1, 12, 0, 0).AddSeconds(Created); } }
        public DateTime ModifiedTime { get { return new DateTime(1904, 1, 1, 12, 0, 0).AddSeconds(Modified); } }
    }
}
